﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Core;

namespace BrokerBase.Lib.Metadata
{
    /// <summary>
    /// 元数据类别
    /// System表示是系统内置类型，比如：int,string,double等
    /// Application表示程序定义的类别：比如Customer,Insurance等
    /// Custom表示客户在运行中定义的类别
    /// </summary>
    public enum MetadataType { System = 1, Application = 2, Custom = 3 }
    /// <summary>
    /// 元数据
    /// </summary>
    public interface IMeta:IPK
    {
        /// <summary>
        /// 名称
        /// </summary>
        string Name { get; set; }
        /// <summary>
        /// 是否是系统类型
        /// </summary>
        int MType { get; set; }
        /// <summary>
        /// 全名(带命名空间路径)
        /// </summary>
        string FullName { get; set; }
        /// <summary>
        /// 装配件名称
        /// </summary>
        string AssemblyName { get; set; }
        /// <summary>
        /// 显示名称
        /// </summary>
        string Caption { get; set; }
        /// <summary>
        /// 是否是基本类型
        /// </summary>
        bool IsBaseType { get; }
        /// <summary>
        /// 是否是数字
        /// </summary>
        bool IsNumeric { get; }
        /// <summary>
        /// 属性
        /// </summary>
        IList<IMetaProperty> Properties { get; set; }
        /// <summary>
        /// 是否可在数据库查询
        /// </summary>
        bool IsQuery { get; set; }
        /// <summary>
        /// 查询的hql
        /// </summary>
        bool QueryHQL { get; set; }
        /// <summary>
        /// 是否是集合
        /// </summary>
        bool IsCollection { get; set; }
    }
}
